package com.ma.implatform.controller;

import com.ma.implatform.config.WebrtcConfig;
import com.ma.implatform.result.Result;
import com.ma.implatform.result.ResultUtils;
import com.ma.implatform.vo.SystemConfigVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Tag(name="系统相关")
@RestController
@RequiredArgsConstructor
@RequestMapping("/system")
public class SystemController {
    private final WebrtcConfig webrtcConfig;
    @GetMapping("/config")
    @Operation(summary = "加载系统配置",description = "加载系统配置")
    public Result<SystemConfigVO> loadConfig(){
        return ResultUtils.success(new SystemConfigVO(webrtcConfig));
    }
}
